/**
 * “优惠券”相关接口
 */
import Http from 'utils/request'
const context = process.env.VUE_APP_CONSOLE_PATH

/**
 * 优惠券列表
 */
export function couponCouponListApi(data) {
  return Http.fetch(context + '/coupon/couponList', data, {
    method: 'post',
    hasErrMsg: true
  })
}

/**
 * 批量生成优惠券梳理
 */
export function couponCreateCouponApi(data) {
  return Http.fetch(context + '/coupon/createCoupon', data, {
    method: 'post',
    hasErrMsg: true
  })
}

/**
 * 绑定优惠券
 */
export function couponBingCouponApi(data) {
  return Http.fetch(context + '/coupon/bingCoupon', data, {
    method: 'post',
    hasErrMsg: true
  })
}
